package com.qingsong.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/** @author JoeZhou */  
@Configuration
public class SpringDocConfig {

	private final String AUTHOR = "qingsong";
	private final String URL = "http://localhost:5300";
	private final String TITLE = "ml-course";
	private final String DESCRIPTION = "<em>MyLesson - 课程微服务</em>";
	private final String VERSION = "v1.0.0";

	/** 通用信息Bean */
	@Bean
	public OpenAPI commonInfo() {
		return new OpenAPI().info(new Info()
				.title(TITLE)
				.description(DESCRIPTION)
				.version(VERSION)
				.contact(new Contact().name(AUTHOR).url(URL)));
	}
}